package com.stylefeng.guns.modular.system.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableLogic;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * <p>
 * 业务管理
 * </p>
 *
 * @author yinjc123
 * @since 2018-04-02
 */
@TableName("crm_customer_company_manage")
@Getter
@Setter
@ToString
public class CustomerCompanyManage extends Model<CustomerCompanyManage> {

    private static final long serialVersionUID = 1L;
    /**
     * 客户id
     */
    @TableId(value = "customer_company_id",type = IdType.INPUT)
    private Integer customerCompanyId;
    /**
     * 客户类型
     */
    @TableField("customer_type_code")
    @NotBlank(message = "客户类型不能为空")
    private String customerTypeCode;
    /**
     * 年销售收入规模（万元）
     */
    @TableField("annual_income")
    private BigDecimal annualIncome;
    /**
     * 客户数量
     */
    @TableField("customer_num")
    private Integer customerNum;
    /**
     * 年度采购规模
     */
    @TableField("annual_purchase_amount")
    private BigDecimal annualPurchaseAmount;
    /**
     * 供应商数量
     */
    @TableField("provider_num")
    private Integer providerNum;
    /**
     * 所属部门
     */
    @TableField("depart_id")
    @NotNull(message = "所属部门不能为空")
    private Integer departId;
    /**
     * 所属销售
     */
    @TableField("salesman_id")
    @NotNull(message = "所属销售不能为空")
    private Integer salesmanId;
    /**
     * 信息来源
     */
    @TableField("source")
    private String source;
    /**
     * 是否建行账户
     */
    @TableField("is_ccb")
    private String isCcb;
    /**
     * 是否计划开户
     */
    @TableField("is_plan_to_open_account")
    private String isPlanToOpenAccount;
    /**
     * 当前状态
     */
    private String state;

    /**
     * 逻辑删除
     */
    @TableField(value = "delete_flag")
    @TableLogic
    private Integer deleteFlag;


    @Override
    protected Serializable pkVal() {
        return this.customerCompanyId;
    }

}
